home *** CD-ROM | disk | FTP | other *** search
- on SetTime
- global gOurOwnTime, gOurOwnDate
- set gOurOwnTime to the time
- set gOurOwnDate to the date
- end
-
- on setTimeDate ptime, pdate
- global gTemporal
- set lhour to GetTime(ptime)
- if ptime contains "PM" then
- if lhour <> 12 then
- set lhour to lhour + 12
- end if
- else
- if lhour = 12 then
- set lhour to 0
- end if
- end if
- set lseason to GetDate(pdate)
- if (lhour < 6) or (lhour > 20) then
- set gTemporal to lseason + 2
- else
- if (lhour > 8) and (lhour < 18) then
- set gTemporal to lseason + 1
- else
- set gTemporal to lseason
- end if
- end if
- end
-
- on GetDate pdate
- set lmark to offset("/", pdate)
- set lmonth to chars(pdate, 1, lmark - 1)
- if lmonth < 4 then
- set lseason to 1
- else
- if lmonth < 7 then
- set lseason to 4
- else
- if lmonth < 10 then
- set lseason to 7
- else
- set lseason to 10
- end if
- end if
- end if
- return lseason
- end
-
- on GetTime ptime
- set lmark to offset(":", ptime)
- set lhour to chars(ptime, 1, lmark - 1)
- return lhour
- end
-
- on ChangeTime pHourHand, TimeHit
- global gOurOwnTime
- set TimeHit to string(TimeHit)
- play frame "MinuteHand"
- SwapSprite(pHourHand, "H" & TimeHit)
- if gOurOwnTime contains "PM" then
- SetOurTime(TimeHit, "PM")
- else
- SetOurTime(TimeHit, "AM")
- end if
- end
-
- on SetOurTime NewTime, AMPM
- global gOurOwnTime
- set gOurOwnTime to string(NewTime) & ":" & AMPM
- end
-
- on ChangeAMPM pIndicator, pAMPM
- global gOurOwnTime
- set TimeHit to GetTime(gOurOwnTime)
- if pAMPM = 1 then
- SwapSprite(pIndicator, "PM")
- SetOurTime(TimeHit, "PM")
- else
- puppetSprite(pIndicator, 0)
- SetOurTime(TimeHit, "AM")
- end if
- end
-
- on ChangeDate pIndicator, pdate
- global gOurOwnDate
- set pdate to string(pdate) & "/"
- set lseason to GetDate(pdate)
- set lmonth to string(lseason)
- if lseason <> 1 then
- SwapSprite(pIndicator, "Season" & lmonth)
- else
- puppetSprite(pIndicator, 0)
- end if
- set gOurOwnDate to lmonth & "/"
- end
-
- on CalcMonth seqnum
- if seqnum = 1 then
- set Month to "1/"
- else
- if seqnum = 2 then
- set Month to "4/"
- else
- if seqnum = 3 then
- set Month to "7/"
- else
- set Month to "10/"
- end if
- end if
- end if
- return Month
- end
-